package com.wlyuan.open.scanner.utils.enums.transport;

import com.wlyuan.core.marker.NamedValue;
import com.wlyuan.core.marker.NamedValueMap;
import lombok.AccessLevel;
import lombok.Getter;
import lombok.RequiredArgsConstructor;

import java.util.Map;

/**
 * @author lijing
 * @description 评分标签
 */
@RequiredArgsConstructor(access = AccessLevel.PRIVATE)
@Getter
public enum TransportFinanceFlagEnum implements NamedValue<Integer> {

    INCOMNE(1, "已收"),
    PAID(2, "已付"),
    INCOMNE_PAID(3, "已收已付"),
    ;


    private final Integer value;
    private final String name;

    private static final Map<Integer, TransportFinanceFlagEnum> MAP = new NamedValueMap<>(TransportFinanceFlagEnum.class);

    public static TransportFinanceFlagEnum fromValue(Integer value) {
        return MAP.get(value);
    }
}
